#pragma once
#include "utility.h"
#include "ComboEditUI.h"

class CLoginDlg :
	public WindowImplBase
{
public:
	CLoginDlg();
	virtual ~CLoginDlg();
	LPCTSTR GetWindowClassName() const { return _T("CLoginDlg"); }
	virtual CDuiString GetSkinFile() { return _T("login.xml"); }
	virtual CDuiString GetSkinFolder() { return  _T("skin"); }
	virtual LRESULT ResponseDefaultKeyEvent(WPARAM wParam);
	virtual LRESULT OnNcActivate(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled);
	CControlUI* CreateControl(LPCTSTR pstrClass);
	virtual void InitWindow();

	stUser& GetUser();

	DUI_DECLARE_MESSAGE_MAP()
	void OnOKBtnClick(TNotifyUI& msg);
	void OnCboUsernameChange(TNotifyUI& msg);
private:
	stUser m_user;
	CLabelUI*		m_pLabTitle = nullptr;
	CComboEditUI*	m_pceName = nullptr;
};

